package com.authine.cloudpivot.ext.mapper;

import com.authine.cloudpivot.ext.domain.HOrgUser;
import com.authine.cloudpivot.util.MyMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface HOrgUserMapper extends MyMapper<HOrgUser> {

    @Select("Select max(sortKey) " +
            "from " +
            "h_org_user")
    Long getMaxSortkey();

    @Select("Select * " +
            "from " +
            "h_org_user " +
            "where userId = #{userId}")
    List<HOrgUser> getHOrgUser(String userId);
}